import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
import Home from '../views/home/index.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    meta: {
      isGoBack: false,
      isMenu: true,
      title: '首页'
    },
  },
  {
    path: '/introduce',
    name: 'introduce',
    meta: {
      isGoBack: false,
      isMenu: true,
      title: '大赛详情'
    },
    component: () => import(/* webpackChunkName: "introduce" */ '../views/introduce/index.vue')
  },
  {
    path: '/friend',
    name: 'friend',
    meta: {
      isGoBack: false,
      isMenu: true,
      title: '奖项说明'
    },
    component: () => import(/* webpackChunkName: "friend" */ '../views/friend/index.vue')
  },
  {
    path: '/worksList',
    name: 'WorksList',
    meta: {
      isGoBack: true,
      title: '作品展示',
      isMenu: true,
    },
    component: () => import(/* webpackChunkName: "WorksList" */ '../views/worksList/index.vue'),
  },
  {
    path: '/reportList',
    name: 'reportList',
    meta: {
      isGoBack: true,
      title: '大赛报道',
      isMenu: true,
    },
    component: () => import(/* webpackChunkName: "reportList" */ '../views/reportList/index.vue'),
  },
  {
    path: '/lookList',
    name: 'lookList',
    meta: {
      isGoBack: true,
      title: '往期回顾',
      isMenu: true,
    },
    component: () => import(/* webpackChunkName: "lookList" */ '../views/lookList/index.vue'),
  },
  {
    path: '/worksDetails',
    name: 'WorksDetails',
    meta: {
      isGoBack: true,
      isMenu: false,
      title: '作品详情'
    },
    component: () => import(/* webpackChunkName: "WorksDetails" */ '../views/worksDetails/index.vue')
  },
  {
    path: '/newsDetails',
    name: 'NewsDetails',
    meta: {
      isGoBack: true,
      isMenu: false,
      title: '新闻详情'
    },
    component: () => import(/* webpackChunkName: "NewsDetails" */ '../views/newsDetails/index.vue')
  },


]

const router = createRouter({
  history: createWebHashHistory(process.env.BASE_URL),
  routes,
})

export default router
